package com.fish.yssb.ui.page.activity.realTime;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.fish.yssb.R;
import com.fish.yssb.ui.page.activity.base.BaseActivity;
import com.fish.yssb.ui.page.activity.setPara.SetParaOneActivity;
import com.fish.yssb.ui.page.activity.setPara.SetParaThreeActivity;
import com.fish.yssb.ui.page.activity.setPara.SetParaTwoActivity;
import com.jaeger.library.StatusBarUtil;


/**
 * A login screen that offers login via email/password.
 */
public class RealTimeListActivity extends BaseActivity implements OnClickListener {
    private static final String TAG = RealTimeListActivity.class.getSimpleName();


    //et_tcp et_cs et_apn et_port_bak et_ip_bak et_port et_ip
    EditText et_apn,et_port_bak,et_ip_bak,et_port,et_ip;
    TextView tv_set,et_tcp,et_cs;
    LinearLayout tv_back;
   private RelativeLayout ll_para_1, ll_para_2, ll_para_3;

    public static void start(Context context) {
        Intent intent = new Intent(context, RealTimeListActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        StatusBarUtil.setTransparent(this);
        StatusBarUtil.setDarkMode(this);
        setContentView(R.layout.activity_realtime_list);
        initview();

    }




    //初始化视图
    @SuppressLint("WrongViewCast")
    private void initview() {
        //登录层、下拉层、其它登录方式层
        EditText et_apn,et_port_bak,et_ip_bak,et_port,et_ip;
        TextView  tv_set,et_tcp,et_cs;
        LinearLayout tv_back;
        ll_para_1 = findViewById(R.id.ll_para_1);
        ll_para_2 = findViewById(R.id.ll_para_2);
        ll_para_3 = findViewById(R.id.ll_para_3);
        tv_back = findViewById(R.id.tv_back);

        ll_para_1.setOnClickListener(this);
        ll_para_2.setOnClickListener(this);
        ll_para_3.setOnClickListener(this);
        tv_back.setOnClickListener(this);

    }

    @Override
    public void onClick(View view) {

        String phone = "";
        String code = "";
        String pwd = "";
        switch (view.getId()) {
            case R.id.ll_para_1:
                //遥测
                RealTimeListYCActivity.start(this);
                break;
            case R.id.ll_para_2:
                //遥信
                RealTimeListYXActivity.start(this);
                break;
            case R.id.ll_para_3:
                //遥脉
                RealTimeListYMActivity.start(this);
                break;
            case R.id.tv_back:
                finish();
                break;
            default:
                break;
        }


    }


}

